<template>
  <div class="brother-a">
    <h3>🧑 兄弟 A（使用 mitt）</h3>
    <button @click="sendMessage">📡 发送消息给兄弟 B</button>
  </div>
</template>

<script setup>
import mittBus from '@/eventbus/mittBus.js' // 引入全局事件总线

function sendMessage() {
  mittBus.emit('mitt-message', 'A 说：兄弟，用 mitt 真香！🚀')
}
</script>

<style scoped>
.brother-a {
  border: 2px solid #ff6b6b;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.brother-a button {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}
</style>
